// 树木风格侧边栏样式
.sidebar-container {
  transition: width 0.28s;
  width: 210px !important;
  background-color: #388E3C;
  height: 100%;
  position: fixed;
  font-size: 0px;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1001;
  overflow: hidden;
  background: $tree-gradient-primary;
  box-shadow: $tree-shadow;

  // 添加树木纹理背景
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: $tree-texture;
    opacity: 0.05;
    pointer-events: none;
  }

  // 重置element-ui菜单样式
  .el-scrollbar {
    height: 100%;
    position: relative;
    z-index: 1;
  }

  .el-menu {
    border: none;
    height: 100%;
    width: 100% !important;
    background: transparent !important;
  }

  .el-menu-item, .el-submenu__title {
    color: rgba(255, 255, 255, 0.85) !important;
    background: transparent !important;
    position: relative;
    
    &::before {
      content: '';
      position: absolute;
      left: 0;
      top: 0;
      height: 100%;
      width: 3px;
      background: transparent;
      transition: all 0.3s;
    }

    &:hover {
      color: #fff !important;
      background: $tree-bg-medium !important;
      
      &::before {
        background: #fff;
      }
    }

    &.is-active {
      color: #fff !important;
      background: $tree-bg-strong !important;
      
      &::before {
        background: #fff;
        width: 4px;
      }
    }
  }

  .el-submenu {
    .el-menu-item {
      min-width: 210px !important;
      background: rgba(0, 0, 0, 0.1) !important;
      
      &:hover {
        background: rgba(0, 0, 0, 0.2) !important;
      }
      
      &.is-active {
        background: rgba(0, 0, 0, 0.3) !important;
      }
    }

    .el-submenu__title {
      &:hover {
        background: $tree-bg-medium !important;
      }
    }

    &.is-opened .el-submenu__title {
      background: rgba(0, 0, 0, 0.1) !important;
    }
  }

  // 图标样式
  .svg-icon {
    margin-right: 12px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.3s;
  }

  .el-menu-item:hover, .el-submenu__title:hover {
    .svg-icon {
      color: #fff;
      transform: scale(1.1);
    }
  }

  .el-menu-item.is-active {
    .svg-icon {
      color: #fff;
      transform: scale(1.1);
    }
  }

  // 折叠状态
  &.hide-sidebar {
    .el-menu-item, .el-submenu__title {
      padding: 0 20px !important;
    }
  }
}

// 响应式处理
@media screen and (max-width: 768px) {
  .sidebar-container {
    width: 54px !important;
  }
}